﻿
using ImageConverter.Pooling;
namespace ImageConverter.Utils.Bitmap
{
    public interface IAspectsTable
    {
        /// <summary>
        /// Gets boundaries for vertical oriented images using all dimensions in this table
        /// </summary>
        SizeBoundary VerticalAspectBoundary { get; }

        /// <summary>
        /// Gets boundaries for horizontal oriented images using all dimensions in this table
        /// </summary>
        SizeBoundary HorizontalAspectBoundary { get; }

        /// <summary>
        /// Calculates aspect ration for given width and height and gets corresponding 
        /// recoding dimensions for calculated aspect
        /// </summary>
        /// <returns>Recoding dimensions for given width and height if table contains corresponding aspect, empty object otherwise</returns>
        Dimensions GetRecodeDimensions(int width, int height);

        /// <summary>
        /// Gets value indicating whether image is too small and shouldn't be resized
        /// </summary>
        bool IsSmallImage(int width, int height);

        /// <summary>
        /// Adds new aspect into table
        /// </summary>
        void AddAspect(double aspect, int width, int height);

        /// <summary>
        /// Converts table to XML
        /// </summary>
        string ToXml();
    }
}
